1. Field of the Invention
The present invention relates to a numerical controller for controlling a machine having an axis for turning a table on which a workpiece is mounted.
2. Description of Related Art
There are known a machine tool having a plurality of linear motion axes and an axis for turning a table for mounting a workpiece, and further having an axis for tilting a tool head or the table. For example, in a five-axis machine tool as shown in FIG. 1, a table 1 is arranged movable in directions of rectangular axes of X, Y and a tool head 2 is arranged movable in a direction of a Z-axis perpendicular to the X- and Y-axes, the table 1 is turned around a C-axis parallel to the Z-axis and further the tool head 2 is arranged to tilt around an A-axis parallel to the X-axis. Thus, a workpiece 3 mounted on the table 1 is machined by a tool of the tool head 2 by driving the five axes.
Further, in a five-axis machine tool as shown in FIG. 2, a tool head 2 is arranged movable in directions of three rectangular axes of X, Y, Z and the table 1 is arranged to turn around a C-axis on the Y-Z-plane and further tilt around an A-axis parallel to the X-axis, to machine a workpiece 3 mounted on the table 1 by a tool of the tool head 2.
It has been necessary to create a machining program including commands for minute segments and issue the commands to servo systems for the respective axes using a CAM (computer-aided manufacturing) system for moving a distal end of the tool with respect to the workpiece 3 along a predetermined path at a predetermined velocity while driving the A- and C-axes.
Specifically, in a machine tool having a C-axis for turning the table 1 and an A-axis for swinging a tool head 2 in addition to linear-motion axes of X, Y, Z, as shown in FIG. 3, it has been hardly possible to perform a cutting operation along a straight line L on the workpiece 3 while turning the table 1 and varying an inclination angle of the tool head 2, as shown in FIG. 4, by commanding a motion path of the straight line L by a single block. Thus, it has been necessary to divide the motion path into a plurality of segments and prepare commands for the plurality of segments. In FIG. 3, Co presents a center of turning of the table 3, CS represents a reference position of angular position of the C-axis, the table 3 is turned so that a commanded angular position of the C-axis is moved to the reference position CS. A controlled point P of the tool head 2 is set at a center of turning of the tool.
Example of Conventional Program Commands
In the block of N200, the code G01 commands cutting feed, the code G90 commands use of absolute value. According to the commands of the blocks, the respective axes of the machine tool are operated as shown in FIGS. 5a-5c. FIG. 5a shows a state in which the tool 2 is positioned at a commanded position by the first block xe2x80x9cN200xe2x80x9d, i.e. X coordinate value of Xc0, Y coordinate value of Yc0, Z coordinate value of Zc0, A-axis angle of 60 degree and C-axis angle of 30 degree, which is a machining start position of the second block xe2x80x9cN 301xe2x80x9d. FIG. 5b shows a state in which the tool is positioned at a commanded position by the second block xe2x80x9cN301xe2x80x9d, i.e. X coordinate value of Xc0, Y coordinate value of Yc0, Z coordinate value of Zc0, A-axis angle of 60 degree and C-axis angle of 30 degree, which is an end position of the second block xe2x80x9cN 301xe2x80x9d and also a start point of the third block xe2x80x9cN 302xe2x80x9d. The machining is performed by the second block as indicated by the solid line. FIG. 5c shows a state in which the tool is positioned at an end point of the third block xe2x80x9cN 301xe2x80x9d to terminate the machining along the straight line L.
In the above example, the cutting operation along the straight line L is divided into only two blocks, but actually it is hardly possible to precisely machine the workpiece along the straight line L by the two blocks. Thus, it has been necessary to divide the motion path into a large number of blocks.
FIG. 4 is depicted with the C-axis stationary and the tool head 2 moved along the C-axis, and actually the C-axis is moved and the tool head as shown in FIG. 5. In these figures, as viewed in the direction of Z-axis.
The above example is directed to the machine tool having the C-axis for turning the table 1 and the A-axis for tilting the tool head 1 in addition to the linear-motion axes. The machine tool may have two axes for turning and for tilting the table 1 in addition to the linear-motion axes.
As described, in the machine tool having one axis for turning the table 1 and one axis for swinging the tool head 2, or a machine tool having two rotational-motion axes for turning and for tilting the table 1, it is necessary to prepare a machining program commanding a minutely divided segments by the CAM system for performing the machining along a predetermined path at a predetermined velocity while turning the table.
Therefore, there arise the following problems.
1) A CAM system is necessary.
2) It is necessary to prepare a lengthy machining program including a large number of minute segments and thus a storage device of large capacity for storing the lengthy machining program is required.
3) Because of the lengthy machining program, it is necessary to rapidly transfer data from an external device to the CNC (Computerized Numerical Control) device in a DNC (Direct Numerical Control) operation in which the machining is performed while transferring a program from the external device to the CNC.
4) It takes a long time for the CNC device to analyze the lengthy program to make it difficult to perform the machining smoothly.
5) It is necessary to create a new machining program for using a tool having a different length.
An object of the present invention is to provide a numerical controller capable of precisely controlling a machine tool having an axis for turning a table with a simple machining program and easily coping with variation of a tool length.
A numerical controller of the present invention is provided for controlling a machine tool having a plurality of linear-motion axes and at least one rotational-motion axis for a table on which a workpiece is mounted, and comprises: motion commanding means for providing a command of motion path for the linear-motion axes, a command of velocity of the tool with respect to the workpiece, and a command of rotational motion of the rotational-motion axis for defining an orientation of the tool with respect to the table; coordinate system defining means for defining a coordinate system with respect to the table; first interpolation means for performing interpolation on the commanded motion path using the commanded velocity in the coordinate system to obtain interpolated position data for the linear-motion axes; second interpolation means for interpolating the rotational motion of the rotational-motion axis based on the commanded motion path and the commanded velocity to obtain interpolated position data for the rotational-motion axis; and correction means for correcting the interpolated position data obtained by the first interpolation means based on the interpolated position data for the rotational-motion axis, wherein motion commands for the linear-motion axes are outputted based on the interpolated position data for the linear-motion axes corrected by the correction means, and motion commands for the rotational-motion axis are outputted based on the interpolated position data for the rotational-motion axis so that a tool center point set to the tool is moved along the commanded motion path at the commanded velocity.
The machine tool may have an axis for tilting said tool with respect to the table as the rotational-motion axis. Further, the machine tool may have an axis for tilting said table with respect to said tool as the rotational-motion axis.
The correction means may correct the interpolated position data for the linear-motion axis using a predetermined tool length compensation amount and/or a predetermined tool radius compensation amount.
The orientation of tool may be provided as a command for rotational position of said rotational-motion axis, or as an orientation vector.
The coordinate system defining means may define a coordinate system which turns with said table, and the motion commanding means may provide the command for motion path of the linear-motion axis in the coordinate system which turns with the table. The motion commanding means may provide the command of motion path for the linear-motion axes by transforming a command of motion path for the linear-motion axes commanded in a coordinate system which does not turn with the table into a command of motion path in a coordinate system which turns with the table.
The tool center point may be set at a tip of the tool. Further, the tool center point may be set at a center of a semispherical end surface of a ball end mill tool or a cutting point on the semispherical end surface of the ball end mill tool. Furthermore, the tool center point may be set at a center of an end face of a flat-end mill tool or a cutting point on the end face of the flat end mill tool.
The machine tool may have a plurality of linear-motion axes and at least one rotational-motion axis for a workpiece holding stock to which a workpiece is fixed. In this case, the motion commanding means provides a command of rotational motion of the rotational-motion axis for defining an orientation of the tool with respect to the workpiece holding stock, and the coordinate system defining means defines a coordinate system with respect to the workpiece holding stock.